package com.njwb.day07;

public class Test接口多实现 {
    public static void main(String[] args) {
        C d=new D();
        d.fn1();
        d.fn2();
        C e=new E();
        e.fn1();
        e.fn2();
    }
}

interface C{
    void fn1();
    void fn2();
}

class D implements C{

    @Override
    public void fn1() {
        System.out.println("D.fn1");
    }

    @Override
    public void fn2() {
        System.out.println("D.fn2");
    }
}

class E implements C{

    @Override
    public void fn1() {
        System.out.println("E.fn1");
    }

    @Override
    public void fn2() {
        System.out.println("E.fn2");
    }
}
